package com.cheer.enums;

/**
 * @author cheer
 */
public enum MallRefundStatusEnum {

    TO_REFUND(1, "待退款"),
    REFUNDED(2, "已退款"),
    REJECTED(3, "拒绝退款");

    private Integer code;
    private String message;

    MallRefundStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String forCode(Integer code) {
        for (MallRefundStatusEnum refundStatusEnum : MallRefundStatusEnum.values()) {
            if (refundStatusEnum.getCode().equals(code)){
                return refundStatusEnum.getMessage();
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
